package com.txtsqlclient.ui.helper;

public class OutputHelper {

	public static String printException(final Throwable exception) {
		final StringBuffer buff = new StringBuffer();
		Throwable t = exception;
		if (t.getMessage() != null) {
			buff.append(t.getMessage());
		}
		while ((t = t.getCause()) != null) {
			if (t.getMessage() != null) {
				buff.append(": ");
				buff.append(TabularLayoutHelper.NEW_LINE);
				buff.append("  ");
				buff.append(t.getMessage());
			}
		}
		return buff.toString();
	}
}